#include "dialog.h"
#include <QApplication>
#include <QDir>
#include <QMessageBox>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    // 创建日志目录
    QDir logDir(QCoreApplication::applicationDirPath() + "/logs");
    if(!logDir.exists())
    {
        logDir.mkdir(QCoreApplication::applicationDirPath() + "/logs");
    }

    // 加载日志配置文件
//    Log4Qt::BasicConfigurator::configure();
//    bool logConfigResult = Log4Qt::PropertyConfigurator::configure(QCoreApplication::applicationDirPath() + "/log4qt.properties");
//    if(!logConfigResult)
//    {
//        QMessageBox::warning(NULL, "错误", "加载日志配置错误，请联系维护人员进行维护");
//    }

    Dialog w;
    w.show();

    return a.exec();
}
